package com.bestcem.xm.txtanls.entity.mongo;

import lombok.*;

import java.io.Serializable;
import java.util.List;

/**
 * TXTANLS_ANLSPROJECT 实体类
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @version v1.0
 * @date 2021年4月30日11:16:33
 */
@ToString(callSuper = true)
@Getter
@Setter
//@Document(collection = TXTANLS_ANLSPROJECT)
public class AnalysisProject extends BaseEntity {

    private static final long serialVersionUID = -5113231236463932521L;
    /**
     * 创建用户Id
     */
    //    @Fiel(value = "creator", targetType = FieldType.STRING)
    private String creator;

    /**
     * 项目名称
     */
    //    @Fiel(value = "name", targetType = FieldType.STRING)
    private String name;

    /**
     * 组织id
     */
    //    @Fiel(value = "org_id", targetType = FieldType.OBJECT_ID)
    private String orgId;

    /**
     * 文本分析项目状态
     *
     * @see com.bestcem.xm.txtanls.enums.AnalysisStatusEnum
     */
    //    @Fiel(value = "status", targetType = FieldType.INT32)
    private Integer status;

    /**
     * 问卷id
     */
    //    @Fiel(value = "survey_id", targetType = FieldType.OBJECT_ID)
    private String surveyId;

    /**
     * 数据源表id
     */
    //    @Fiel(value = "table_id", targetType = FieldType.OBJECT_ID)
    private String tableId;

    /**
     * 数据源表名
     */
    //    @Fiel(value = "table_name", targetType = FieldType.STRING)
    private String tableName;

    /**
     * 训练字段信息
     */
    //    @Fiel(value = "textfieldList", targetType = FieldType.ARRAY)
    private List<TextField> textFieldList;

    /**
     * 时间字段id
     */
    //    @Fiel(value = "timefield_id", targetType = FieldType.STRING)
    private String timeFieldId;

    /**
     * 时间字段名字
     */
    //    @Fiel(value = "timefield_name", targetType = FieldType.STRING)
    private String timeFieldName;

    /**
     * 训练状态
     *
     * @see com.bestcem.xm.txtanls.enums.TrainStatusEnum
     */
    //    @Fiel(value = "train_status", targetType = FieldType.INT32)
    private Integer trainStatus;

    /**
     * 训练进度, 剩余的条数
     */
    //    @Fiel(value = "train_progress", targetType = FieldType.INT32)
    private Integer trainProgress;


    private Boolean sample;


    @NoArgsConstructor
    @AllArgsConstructor
    @ToString
    @Setter
    @Getter
    public static class TextField implements Serializable {
        private static final long serialVersionUID = 2808726620840986656L;

        //    @Fiel(value = "id", targetType = FieldType.STRING)
        private String id;

        //    @Fiel(value = "value", targetType = FieldType.STRING)
        private String value;
    }
}
